<%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=utf-8" errorPage="/error.jsp" isELIgnored="false" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://www.opensymphony.com/oscache" prefix="cache" %>
<%@ taglib uri="http://atleap.blandware.com/taglib" prefix="atleap" %>
<html:xhtml />

<atleap:javascript formName="contactForm" staticJavascript="false" dynamicJavascript="true" method="validateForm" cdata="false" />
<atleap:form action="contact/perform" method="POST" disableButtonsOnSubmit="false">
	<atleap:messages property="preparationFailed" />
	<atleap:messages property="sendFailed" />
	<atleap:messages property="unknownError" />
    <table cellpadding="0"  cellspacing="0" border="0" class="modificationTable">
        <tr>
            <th>
                <atleap:label property="userName" key="contact.form.userName" colon="false" helpTip="true" />
            </th>
            <td>
                <html:text property="userName" styleClass="text" style="width: 300px;" />
            </td>
        </tr>
        <tr>
            <th>
                <atleap:label property="email" key="contact.form.email" colon="false" helpTip="true" />
            </th>
            <td>
                <html:text property="email" styleClass="text" style="width: 300px;" />
            </td>
        </tr>
        <tr>
            <td colspan="2" style="text-align: center;">
                <atleap:label property="message" key="contact.form.message" colon="false" helpTip="true" />
            </td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <html:textarea property="message" style="width: 95%; height: 250px;" />
            </td>
        </tr>
    </table>


    <atleap:submit styleClass="button" onclick="this.form.target = '_self'; bCancel= false; return true;"><atleap:message key="core.commons.buttons.send" /></atleap:submit>
    <atleap:isUserInRole roles="core-mailTemplate-previewMessage">
        <atleap:submit property="preview" styleClass="button" onclick="this.form.target = '_blank'; bCancel= false; return true;"><atleap:message key="core.commons.buttons.preview" /></atleap:submit>
	</atleap:isUserInRole>
    <atleap:cancel styleClass="button" onclick="this.form.target = '_self'; bCancel= true; return true;"><atleap:message key="core.commons.buttons.cancel" /></atleap:cancel>
</atleap:form>
